import store from '@/store'
export default {
  methods: {
    checkPermission(key) {
      const { userInfo } = store.state.user
      console.log('-----', userInfo)
      if (userInfo.roles.points && userInfo.roles.points.length) {
        console.log(userInfo.roles.points.some(item => item.name === key))
        return userInfo.roles.points.some(item => item === key)
      }
      return false
    }
  }
}
